package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.MarketBrand;
import com.cskaoyan.model.admin.bo.BaseParam;
import com.cskaoyan.model.admin.vo.BaseRespVo;
import com.cskaoyan.model.vx.vo.WxBrandListRespVO;
import com.cskaoyan.service.wx.WxBrandService;
import org.apache.shiro.authz.annotation.RequiresUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: WxBrandController
 * @Author: WangEnzhao
 * @Description: 评判模块
 * @CreateTime: 2021/12/20:14:00
 */
@RestController
@RequestMapping("wx/brand")
public class WxBrandController {

    @Autowired
    WxBrandService wxBrandService;

    /***
    * @Author: WangEnzhao
    * @Description: 查询品牌
    * @CreateTime: 20:42 12/2/2021
    * @Param: [baseParam]
    * @return: com.cskaoyan.model.admin.vo.BaseRespVo
    */
    @RequestMapping("list")
    public BaseRespVo brandList(BaseParam baseParam){
        WxBrandListRespVO wxBrandListRespVO = wxBrandService.brandList(baseParam);
        return BaseRespVo.ok(wxBrandListRespVO);
    }

    /***
    * @Author: WangEnzhao
    * @Description: 获取品牌详情
    * @CreateTime: 20:59 12/2/2021
    * @Param: []
    * @return: com.cskaoyan.model.admin.vo.BaseRespVo
    */
    @RequestMapping("detail")
    public BaseRespVo brandDetail(Integer id){
        MarketBrand marketBrand = wxBrandService.brandDetail(id);
        return BaseRespVo.ok(marketBrand);
    }
}
